import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: () => import ('@/views/home/index') //路由懒加载
    },
    {
      path:'/main',
      component:() => import ('@/views/main/index')
    },
    {
      path:'/goods',
      component:() => import ('@/views/goods/index')
    },
    {
      path:'/see',
      component:() => import ('@/views/see/index')
    }
  ]
})
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}